
<!--<%'-------------------------- Server side includes -------------------------%>-->
<!-- #include virtual="/components_cb/client/initDialogEnv_tagged.inc"-->
<!-- #include virtual='/components_cb/server/controls.inc' -->
<html>
<head>
    <title>OneSite</title>
    <script type="text/javascript" src="/components_cb/client/scriptinc_js.htm"></script>
    <script type="text/javascript" src="/components_cb/client/scriptinc_nocache_js.htm"></script>
    <script type="text/javascript" src="/components_cb/client/htmlstart.min.js"></script>
    <link rel="stylesheet" type="text/css" href="/components_cb/styles/base.min.css" />
    <link rel="stylesheet" type="text/css" href="/components_cb/styles/form.min.css" />
    <link rel="stylesheet" type="text/css" href="/components_cb/styles/supertable.min.css" />
    <!--<%'-------------------------- Create global Variables ----------------------%>-->
    <script type="text/javascript">
        //var top = window.dialogArguments;
        window.dialogWidth = "376px";
        window.dialogHeight = "315px";
        window.resizeTo(380, 350);
        var xmlProperties = NewXmlDOM(false);
        var xmlPropertiesOrg = NewXmlDOM(false);
        var xmlCabinetDocumentType = NewXmlDOM(false);
        var xmlControls_WATCH_Initialize = NewXmlDOM(false);
    </script>
    <script type="text/javascript">
        var pageStage = '';
        function InitialLoad_Start() {
            var sXML;
            otblProperties = $('#tblProperties').data('ST');
            sXML = "<Page><Request ";
            if (!isNull(top.GetPSCurrent("DOCUMENTTYPEID")) && parseInt(top.GetPSCurrent("DOCUMENTTYPEID"), 10) > 0) {
                sXML += "DocumentTypeID='" + top.GetPSCurrent("DOCUMENTTYPEID") + "' ";
            }
            else {
                sXML += "DocumentTypeID='" + '' + "' ";
            }
            sXML += "/></Page>";
            InitialLoad_GetData("", top.ShellAddress + "DocumentManagement/ASPX/DocumentType.aspx/GetDocumentTypePropertyInitial", sXML);
        }

        function InitialLoad_onDataReady() {
            InitialLoad_FillXML("Properties", "xmlProperties", "xmlPropertiesOrg");
            InitialLoad_FillXML("CabinetDocumentType", "xmlCabinetDocumentType", "");
        }

        function filterProperties() {
            var oRows;
            setHeaderLabels();
            xmlProperties.loadXML(xmlPropertiesOrg.xml);
            StoreDataXml('xmlProperties', xmlProperties);
            oRows = $(xmlProperties).find("Row");
            for (var i = 0, nLen = $(oRows).length; i < nLen; i++) {
                if ($(oRows[i]).attr("Selected").toString() !== '1') {
                    $(xmlProperties).find(oRows[i]).remove().end();
                }
            }
            otblProperties.updateTable();
        }

        function Initialize() {
            var width, height;
            width = window.dialogWidth;
            height = window.dialogHeight;
            rpiModalHeader.setLoadIndicator(false);
            filterProperties();
            if ($.browser.mozilla) {
                window.resizeTo(parseInt(window.dialogWidth, 10) + 12, parseInt(window.dialogHeight, 10) + 60);
                $("#tdModalHeader").css({ "width": "234px", "word-break": "", "text-overflow": "" });
                $("#tdPID").css({ "width": "86px", "padding-left": "0", "padding-right": "0" });
            }
            else if ($.browser.safari) {
                window.resizeTo(parseInt(window.dialogWidth, 10) + 12, parseInt(window.dialogHeight, 10) + 35);
                $("#tdPID").css("width", "95px");
                $("#tdModalHeader").css("text-overflow", "");
            }

            else if ($.browser.chrome) {
                window.resizeTo(parseInt(window.dialogWidth, 10) + 19, parseInt(window.dialogHeight, 10) + 65);
                $("#tdPID").css("width", "95px");
                $("#tdModalHeader").css("text-overflow", "");
            }
        }

        function setHeaderLabels() {
            var row;
            row = $(xmlCabinetDocumentType).find("Row").eq(0);
            if ($(row).length > 0) {
                $("#labelDescription").html($(row).attr("Type"));
            }
            else {
                $("#labelDescription").html("Unknown");
            }
        }

        function InitialLoad_onComplete() {
            Controls_Initialize();
            Initialize();
            Controls_WATCH_Initialize();
            xmlControls_WATCH_Initialize.async = false;
            xmlControls_WATCH_Initialize.loadXML("<Row a='1' />");
            StoreDataXml("xmlControls_WATCH_Initialize", xmlControls_WATCH_Initialize);
            setHeaderLabels();
            otblProperties.updateTable();
            top.setCustomDialogSize(380, 340);
            top.setActionButtonsPosition(0, 0, window);
        }

        function afterBinding() {
            Controls_WATCH_Initialize();
            Initialize();
        }

        function doCancel() {
            window.returnValue = false;
            top.hideDialog(window.returnValue, window, bUsingIframe);
        }

        $(document).ready(function () {
            $("#tblProperties").mouseover(function (event) {
                if ($(event.target)[0].nodeName.toUpperCase().toString() === "TH" && $(event.target).attr("class").toString() === "center sorting") {
                    $(event.target).css({ 'background': '#686fa1' });
                    $(event.target).css({ 'color': '#FFFFFF' });
                    $(event.target).mouseleave(function () {
                        $(event.target).css({ 'background': '#3366cc' });
                    });
                }
            });
        });
    </script>
</head>
<%call CreateImports("errorhandling")%>
<%call CreateImports("modalheader")%>
<%call CreateImports("supertable")%>
<body class="datamodal" tabindex="-1">
    <div class="RPI_MODALHEADER" id="mhead" pagetrail="Document Management - " pagelabel="View property document types"
        pageid="101.090.020.025">
    </div>
    <table cellpadding="0" cellspacing="0" border="0" id="headerTable">
        <tr>
            <td style="vertical-align: bottom; font-weight: bold;">
                Document type&#160;&#160;
            </td>
            <td id="labelDescription" style="vertical-align: bottom; width: 200px;">
            </td>
        </tr>
    </table>
    <div class="RPI_SUPERTABLE" id="tblProperties" rpdatasource="#xmlProperties" rpdatanode="Properties"
        rpheader="true" rppagesize="7" rpwidth="350px" rpheight="200px" rpscroll="FALSE"
        rpheightlock="true" rpnodatamsg="This document type has not been migrated to any properties">
        <table border="1" style="display: none;">
            <thead>
                <tr style='height: 34px;'>
                    <th style="text-align: center;" class="center" id="effectiveDateCol" rpsortby="Name"
                        title="Click to sort">
                        Name
                    </th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td rpdatafld="Name" style='text-align: left;' nowrap>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    <div class="IFrameButtons">
    <table id="buttons" border="0">
        <tr>
            <td>
                <%call Controls_CreateButton("btnClose","Close","doCancel()","1","","")%>
            </td>
        </tr>
    </table>
    </div>
    <!-- Code to know when binding is done. -->
    <input type="hidden" value="~" datasrc="#xmlControls_WATCH_Initialize" datafld="a"
        onpropertychange="this.onpropertychange='';afterBinding();" id="Hidden1" name="Hidden1" />
</body>
<script type="text/javascript">
    $(window).load(function () {
        var otblProperties = "";
        InitialLoad_ScreenReady();
        InitialLoad_Start();        
    });

    var oCBConverted = { 'ie': true, 'firefox': true, 'chrome': true, 'safari': true };
 
</script>
</html>
